﻿using LimaLims.Core.Entity.Basic;
using LimaLims.Core.Enum;
using Microsoft.EntityFrameworkCore;

namespace LimaLims.Core.Entity.TestCenter
{
    /// <summary>
    /// 试验计划
    /// </summary>
    [Comment("试验计划")]
    public class ExperimentPlan : DEntityTenant
    {
        /// <summary>
        /// 计划编号
        /// </summary>
        [Comment("计划编号")]
        public string Code { get; set; }

        /// <summary>
        /// 班组Id
        /// </summary>
        [Comment("班组Id")]
        public long TeamId { get; set; }

        /// <summary>
        /// 班组集合
        /// </summary>
        public Team Team { get; set; }

        [Comment("计划类型")]
        public ExperimentType Type { get; set; }

        /// <summary>
        /// 计划状态
        /// </summary>
        [Comment("计划状态")]
        public ExperimentPlanStatus PlanStatus { get; set; }

        /// <summary>
        /// 计划开始时间
        /// </summary>
        [Comment("计划开始时间")]
        public DateTime PlanStartTime { get; set; }

        /// <summary>
        /// 计划完成时间
        /// </summary>
        [Comment("计划完成时间")]
        public DateTime PlanEndTime { get; set; }

        /// <summary>
        /// 实际开始时间
        /// </summary>
        [Comment("实际开始时间")]
        public DateTime? ActualStartTime { get; set; }

        /// <summary>
        /// 实际完成时间
        /// </summary>
        [Comment("实际完成时间")]
        public DateTime? ActualEndTime { get; set; }

        /// <summary>
        /// 检验方案Id
        /// </summary>
        [Comment("检验方案Id")]
        public long InspectionSchemeId { get; set; }

        /// <summary>
        /// 检验方案
        /// </summary>
        public InspectionScheme InspectionScheme { get; set; }

        /// <summary>
        /// 多对多中间表（计划-产品）
        /// </summary>
        public ICollection<ExperimentPlanProduct> ExperimentPlanProducts { get; set; }

        /// <summary>
        /// 多对多中间表（计划-物料）
        /// </summary>
        public ICollection<ExperimentPlanMaterial> ExperimentPlanMaterials { get; set; }

    }
}
